package org.ewaf.framework.util;

import java.io.Serializable;

public class Triple implements Serializable {

	private static final long serialVersionUID = -4886165177352262472L;

	private Object one;
	private Object two;
	private Object three;
	
	public Triple(Object one, Object two, Object three) {
		this.one = one;
		this.two = two;
		this.three = three;
	}

	public Object getOne() {
		return one;
	}

	public Object getThree() {
		return three;
	}

	public Object getTwo() {
		return two;
	}

	public void setOne(Object one) {
		this.one = one;
	}

	public void setThree(Object three) {
		this.three = three;
	}

	public void setTwo(Object two) {
		this.two = two;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		
		if (!(obj instanceof Triple)) {
			return false;
		}
		
		Triple tpl = (Triple) obj;
		return tpl.one.equals(one) && tpl.two.equals(two) && tpl.three.equals(three);
	}

	@Override
	public int hashCode() {
		return one.hashCode();
	}
	
	@Override
	public String toString() {
		return one + ":" + two + ":" + three;
	}
	
	@Override
	public Triple clone() throws CloneNotSupportedException {
		return (Triple) super.clone();
	}
	
}
